package thread;

/**
 * 创建线程方式2
 *  静态代理方式实现
 *
 * @author dingwen
 * @date 2021/08/30
 */
public class CreateThread2 implements Runnable{
    @Override
    public void run() {
        System.out.println("Thread.currentThread().getName() = " + Thread.currentThread().getName());
        System.out.println("创建了一个新的线程");
    }

    public static void main(String[] args) {
        System.out.println("Thread.currentThread().getName() = " + Thread.currentThread().getName());
        System.out.println("main 线程");
        new Thread(new CreateThread2()).start();
    }
}
